<script>
	/**
	 * vuex管理登陆状态，具体可以参考官方登陆模板示例
	 */
	import {
		mapMutations
	} from 'vuex';
	export default {
		methods: {
			...mapMutations(['login'])
		},
		onLaunch: function() {
			let userInfo = uni.getStorageSync('userInfo') || '';
			if(userInfo.id){
				//更新登陆状态
				uni.getStorage({
					key: 'userInfo',
					success: (res) => {
						this.login(res.data);
					}
				});
			}
			
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<style lang='scss'>
	.button_anniu{
		width: 100%;
		/* margin: 0upx 5%; */
		text-align: center;
		height: 90upx;
		line-height: 90upx;
		background-color: #22ac38;
		border-radius: 20upx;
		letter-spacing:5upx;
		font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;
		color: #FFFFFF;
		-moz-box-shadow: inset 0 0 10px #FFF;
		-webkit-box-shadow: inset 0 0 10px #FFF;
		box-shadow: inset 0 0 10px #FFF;
	}
</style>
